import java.util.ArrayList;

/**
 * 集合存储电影对象
 */
public class ArrayListDemo5 {
    public static void main(String[] args) {
        Film f1 = new Film("青蛇",9.8);
        Film f2 = new Film("红孩儿",9.9);
        Film f3 = new Film("喜羊羊",1.0);
        ArrayList<Film> list = new ArrayList<>();
        list.add(f1);
        list.add(f2);
        list.add(f3);
        for (int i = 0; i < list.size(); i++) {
            System.out.println(list.get(i).getName());
        }
    }
}

class Film{
   private String name;
   private double remark;

    public Film() {
    }

    public Film(String name, double remark) {
        this.name = name;
        this.remark = remark;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getRemark() {
        return remark;
    }

    public void setRemark(double remark) {
        this.remark = remark;
    }

}
